import service from '@/utils/request'

export const usePositionTypeApi = (id: number) => {
	return service.get('/nb/position_type/findById', {
		params: {
			id: id
		}
	})
}

export const usePositionTypeSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/nb/position_type/edit', dataForm)
	} else {
		return service.post('/nb/position_type/add', dataForm)
	}
}

export const findAll = () => {
	return service.get('/nb/position_type/list')
}
